<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>主产品</title>
    <link rel="stylesheet" href="../../css/reset.css">
    <link rel="stylesheet" href="../../css/common.css">
    <link rel="stylesheet" href="../../css/style.css">
    <style>
      body{
        /*background-color: #0c1021;*/
      }
      .huagong_list{
        overflow: hidden;
        font-size: 14px;
      }
      .huagong_list .item{
        float: left;
        margin: 0 15px 30px 0;
        overflow: hidden;
      }
      .huagong_list .left_img{
        float: left;
        margin-right: 5px;
        width: 51px;
        height: 53px;
      }
      .huagong_list .left_img img{
        width: 100%;
        height: 100%;
      }
      .huagong_list .right_text{
        float: left;
        margin-top: 5px;
        color: #ffffff;
      }
      .huagong_list .value{
        display: inline-block;
        width: 55px;
        text-align: right;
        word-break: keep-all;
      }

    </style>

</head>
<body class="">

<div class="huagong_list">
  <div class="item">
    <div class="left_img">
      <img src="../../img/liusuan.png" alt="">
    </div>
    <div class="right_text">
      <div class="stock">库存: <span class="value liusuan_ku"></span></div>
      <div class="output">产量: <span class="value liusuan_ch"></span></div>
    </div>
  </div>
  <div class="item">
    <div class="left_img">
      <img src="../../img/yansuan.png" alt="">
    </div>
    <div class="right_text">
      <div class="stock">库存: <span class="value yansuan_ku"></span></div>
      <div class="output">产量: <span class="value yansuan_ch"></span></div>
    </div>
  </div>
  <div class="item">
    <div class="left_img">
      <img src="../../img/pvc.png" alt="">
    </div>
    <div class="right_text">
      <div class="stock">库存: <span class="value pvc_ku"></span></div>
      <div class="output">产量: <span class="value pvc_ch"></span></div>
    </div>
  </div>
  <div class="item">
    <div class="left_img">
      <img src="../../img/yejian.png" alt="">
    </div>
    <div class="right_text">
      <div class="stock">库存: <span class="value yejian_ku"></span></div>
      <div class="output">产量: <span class="value yejian_ch"></span></div>
    </div>
  </div>
  <div class="item">
    <div class="left_img">
      <img src="../../img/yelu.png" alt="">
    </div>
    <div class="right_text">
      <div class="stock">库存: <span class="value yelv_ku"></span></div>
      <div class="output">产量: <span class="value yelv_ch"></span></div>
    </div>
  </div>
</div>


</body>
<script type="text/javascript" charset="utf-8" src="../../js/jquery-3.1.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/common.js"></script>
<script>
$(function (){
  getJson('zzp_hxzb_clykc.json',{},function (res) {
    // console.log(res)

    let liusuan_ku = res.data.filter(item=>item.groupName === '硫酸库存');
    let liusuan_ch = res.data.filter(item=>item.groupName === '硫酸产量');
    let yansuan_ku = res.data.filter(item=>item.groupName === '盐酸库存');
    let yansuan_ch = res.data.filter(item=>item.groupName === '盐酸产量');
    let yelv_ku = res.data.filter(item=>item.groupName === '液氯库存');
    let yelv_ch = res.data.filter(item=>item.groupName === '液氯产量');
    let pvc_ku = res.data.filter(item=>item.groupName === 'PVC库存');
    let pvc_ch = res.data.filter(item=>item.groupName === 'PVC产量');
    let yejian_ku = res.data.filter(item=>item.groupName === '液碱库存');
    let yejian_ch = res.data.filter(item=>item.groupName === '液碱产量');

    $('.liusuan_ku').text((parseFloat(Number(liusuan_ku[0]?.qty/1000 || 0).toFixed(2))) + (liusuan_ku[0]?.jldw || '万吨'));
    $('.liusuan_ch').text((parseFloat(Number(liusuan_ch[0]?.qty/1000 || 0).toFixed(2))) + (liusuan_ch[0]?.jldw || '万吨'));
    $('.yansuan_ku').text((parseFloat(Number(yansuan_ku[0]?.qty/1000 || 0).toFixed(2))) + (yansuan_ku[0]?.jldw || '万吨'));
    $('.yansuan_ch').text((parseFloat(Number(yansuan_ch[0]?.qty/1000 || 0).toFixed(2))) + (yansuan_ch[0]?.jldw || '万吨'));
    $('.yelv_ku').text((parseFloat(Number(yelv_ku[0]?.qty/1000 || 0).toFixed(2))) + (yelv_ku[0]?.jldw || '万吨'));
    $('.yelv_ch').text((parseFloat(Number(yelv_ch[0]?.qty/1000 || 0).toFixed(2))) + (yelv_ch[0]?.jldw || '万吨'));
    $('.pvc_ku').text((parseFloat(Number(pvc_ku[0]?.qty/1000 || 0).toFixed(2))) + (pvc_ku[0]?.jldw || '万吨'));
    $('.pvc_ch').text((parseFloat(Number(pvc_ch[0]?.qty/1000 || 0).toFixed(2))) + (pvc_ch[0]?.jldw || '万吨'));
    $('.yejian_ku').text((parseFloat(Number(yejian_ku[0]?.qty/1000 || 0).toFixed(2))) + (yejian_ku[0]?.jldw || '万吨'));
    $('.yejian_ch').text((parseFloat(Number(yejian_ch[0]?.qty/1000 || 0).toFixed(2))) + (yejian_ch[0]?.jldw || '万吨'));
  })
})
</script>
</html>
